package com.ww;

import com.ww.config.MybatisConfig;
import com.ww.mapper.UserMapper;
import com.ww.pojo.User;
import com.ww.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MybatisTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext configApplicationContext = new AnnotationConfigApplicationContext(MybatisConfig.class);
        UserService service = (UserService) configApplicationContext.getBean(UserService.class);
        System.out.println(service.getUser(1));
        System.out.println(service.getUser(1));
    }
}
